'use strict';

/**
 * @param {Egg.Application} app - egg application
 */

module.exports = app => {
  const { router, controller, jwt } = app;

  //后台接口

  router.get("/admin/order/list",controller.admin.order.getOrderList)

  router.post('/admin/upload', jwt, controller.common.common.upload)

  router.get('/admin/users/captcha', controller.common.common.captcha)

  router.post('/admin/users/login', controller.common.common.login)

  router.get('/admin/users/list', controller.admin.users.getUserList)

  router.get('/admin/user/group/list', jwt, controller.admin.group.groupList)

  router.post('/admin/user/group/add', jwt, controller.admin.group.addGroup)

  router.get('/admin/member/list', jwt, controller.admin.member.getMemberList)

  router.get('/admin/goods/list', jwt, controller.admin.goods.getGoodsList)

  router.post('/admin/goods/category/add', jwt, controller.admin.goodsCategory.addGoodsCategory)

  router.post('/admin/goods/brand/add', jwt, controller.admin.goodsBrand.addGoodsBrand)

  router.get('/admin/goods/brand/list', jwt, controller.admin.goodsBrand.getGoodsBrandList)

  router.post('/admin/shop/add', jwt, controller.admin.shop.addShop)

  router.get('/admin/shop/infrom', jwt, controller.admin.shop.shopInfrom)

  router.post('/admin/shop/memberAuthlist', jwt, controller.admin.shop.memberAuthlist)

  router.post('/admin/shop/passAudit', jwt, controller.admin.shop.passAudit)

  router.get('/admin/store/settlement', jwt, controller.admin.storeSettlement.storeSettle)

  router.post('/admin/store/name', jwt, controller.admin.storeSettlement.selectStore)

  router.get('/admin/goods/category/tree', jwt, controller.common.common.goodsCategoryTree)

  router.post('/admin/goods/category/add', jwt, controller.admin.goodsCategory.addGoodsCategory)

  //中台接口

  router.post('/shop/upload', jwt, controller.common.common.upload)

  router.get('/shop/users/captcha', controller.common.common.captcha)

  router.post('/shop/users/login', controller.common.common.login)

  router.post('/shop/users/register', controller.shop.users.register)

  router.get('/shop/goods/category/tree', jwt, controller.common.common.goodsCategoryTree)

  router.get('/shop/goods/brand/list', jwt, controller.shop.goodsBrand.getGoodsBrand)

  router.get('/shop/goods/list', jwt, controller.shop.goods.goodsList)

  router.post('/shop/goods/add', jwt, controller.shop.goods.goodsAdd)

  router.post('/shop/goods/del', jwt, controller.shop.goods.goodsDel)

  router.get('/shop/order/orderList', jwt, controller.shop.order.orderList)

  router.post('/shop/shop/edit', jwt, controller.shop.shop.shopEdit)

  router.get('/shop/shop/info', jwt, controller.shop.shop.shopInfo)

  router.get('/shop/adress/info', jwt, controller.shop.shop.adressInfo)

  router.get('/shop/site/info', jwt, controller.shop.site.siteInfo)

  router.post('/shop/site/edit', jwt, controller.shop.site.siteEdit)

  router.get('/shop/auth/info', jwt, controller.shop.memberAuth.shopAuthInfo)

  router.get('/shop/member/count', jwt, controller.shop.member.memberCount)

  router.post('/shop/member/query', jwt, controller.shop.member.membeQuery)

  router.get('/shop/order/orderlist', controller.shop.order.orderlist)

  router.get('/shop/member/overview', jwt, controller.shop.memberRechargeOrder.overview)

  router.get('/shop/store/settlement/detail', jwt, controller.shop.storeSettlement.lookDetail)

  router.get('/shop/store/order', jwt, controller.shop.storeOrder.storeSettlement)

  router.post('/shop/member/time', jwt, controller.shop.memberRechargeOrder.timeList)

  //前台接口

  router.get('/api/goods/getGoods', controller.api.goods.getGoods)

  router.get('/api/goods/getGoodsDetail', controller.api.goods.getGoodsDetail)

};
